home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
lang_asm
/
zendisk1
/
lst10-8.asm
< prev
next >
Wrap
Assembly Source File
|
1990-02-15
|
573b
|
27 lines
;
; *** Listing 10-8 ***
;
; Initializes a 1000-word array using a single
; repeated STOSW.
;
jmp Skip
;
ARRAY_LENGTH equ 1000
WordArray dw ARRAY_LENGTH dup (?)
;
Skip:
call ZTimerOn
mov di,seg WordArray
mov es,di
mov di,offset WordArray
;point ES:DI to the array to
; fill, since STOSW must
; use that segment:offset combo
; as a memory pointer
sub ax,ax ;we'll fill with the value zero
mov cx,ARRAY_LENGTH ;# of words to fill
cld ;make STOSW add 2 to DI after each
; execution
rep stosw ;fill the array
call ZTimerOff